package com.example.springbootdatajpa.service.impl;

import com.example.springbootdatajpa.entities.Product;
import com.example.springbootdatajpa.repositories.ProductRepository;
import com.example.springbootdatajpa.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductRepository productRepository;

    @Override
    public List<Product> findAllBetweenStoreProcedure(BigDecimal min, BigDecimal max) {
        return productRepository.findAllBetweenStoredProcedure(min, max);
    }
}
